﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManagePages.aspx.cs" Inherits="Admin_Portal_ManagePages" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Manage page</title>
    <script type="text/javascript" src="/scripts/jquery-1.2.6.js"></script>
	<script type="text/javascript" src="/scripts/thickbox.js"></script>	
    
	<link rel="Stylesheet" type="text/css" href="/styles/thickbox.css" />
    <link href="../admin.css" rel="stylesheet" type="text/css" />
	<link rel="StyleSheet" href="../dtree.css" type="text/css" />

    <script type="text/javascript" src="../dtree.js"></script>
    
	<script type="text/javascript">
	    function selectLayout() {
	        var current = document.getElementById("<%=tl.ClientID %>").value;
	        var url = "SelectLayout.aspx?current=" + current + "&KeepThis=true&TB_iframe=true&height=400&width=600";
	        tb_show("Select Layout", url, false);
	    }
	    
	    function layoutSelected(tempId) {
	        tb_remove();
	        document.getElementById("<%=tl.ClientID %>").value = tempId;
	    }
	</script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <a href="managepages.aspx?action=add">添加页面</a>
            <asp:LinkButton ID="lbb" runat="server" OnClick="lbb_Click" Text="生成所有页面" />
            <table width="95%">
                <tr valign="top">
                    <td style="width: 150px;">
                        <%=PagesTreeScript %>
                    </td>
                    <td>
                        <asp:Panel ID="pc" runat="server" Enabled="false" Width="100%">
                            <table width="100%">
                                <tr>
                                    <td colspan="2">
                                    <asp:HyperLink ID="lnkConfig" Visible="false" runat="server" Target="_blank" Text="配置页面"/>
                                    &nbsp;&nbsp;<asp:LinkButton ID="lbtnBuild" Visible="false" runat="server" OnClick="lbtnBuild_Click" Text="生成静态页" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:80px;">
                                        名称</td>
                                    <td>
                                        <asp:TextBox ID="tn" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        父级</td>
                                    <td>
                                        <asp:DropDownList ID="dlstParent" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        URL</td>
                                    <td>
                                        <asp:TextBox ID="tu" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        布局</td>
                                    <td>
                                        <asp:TextBox ID="tl" runat="server" /><a href="javascript:selectLayout();">选择</a></td>
                                </tr>
                                <tr>
                                    <td>
                                        序号</td>
                                    <td>
                                        <asp:TextBox ID="ts" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        标题</td>
                                    <td>
                                        <asp:TextBox ID="tt" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        关键词</td>
                                    <td>
                                        <asp:TextBox ID="tk" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        描述</td>
                                    <td>
                                        <asp:TextBox ID="td" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnOK" runat="server" OnClick="btnOK_Click" Text=" 确定 " />
                                        <asp:Button ID="btnDel" runat="server" OnClick="btnDel_Click" OnClientClick="return confirm('确定要删除此页面吗?');" Visible="false" Text=" 删除 " />
                                        </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
